import { defineStore } from "pinia";

export default defineStore("useEnumStore", {
  persist: {
    storage: sessionStorage,
  },

  state: () => {
    return {
      enumData: {},
    };
  },

  getters: {},

  actions: {
    async setEnumData(enumData: any) {
      this.enumData = enumData;
    },
    useEnum(str: string) {
      // @ts-ignore
      return this.enumData[str];
    },
  },
});
